<template>
	<view>
		<!--首页模块化组合组件-->
		<design-page :page-data="pageData"></design-page>
	</view>
</template>

<script>
	import { mapState } from 'vuex'
	import { mapMutations } from 'vuex'
	export default {
		data(){
			return {
				pageData: []
			}
		},
		onLoad() {
			this.getPageData()
		},
		computed: {
			...mapState(["scene"]),
		},
		methods: {
			...mapMutations(['SET_STOCK']),
			getPageData(){
				this.$api.GetDesignPageData({
					code: "mobile_food",
					scene: this.scene
				}).then(res=>{
					this.pageData = res.data.items
					this.SET_STOCK(res.otherData)
				})
			}
		}
	}
</script>

<style>
</style>